Skip to content

Add --1200bps-reset param to device-install/update scripts #6752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 3, 2025

Conversation

ThatKalle
Copy link
Contributor

@ThatKalle ThatKalle commented May 6, 2025

This PR adds a --1200bps-reset option to the device-install/update scripts.

--1200bps-reset performs esptool --baud 1200 --after no_reset read_flash_status while accouting for user provided -p and discovered esptool.

This would allow users to attempt to set their device to update mode without hardware interaction prior to running the scripts. Akin to pressing the 1200bps Reset button on the web-flasher.

This change should not effect normal opreations.


This operation is working on a LILYGO T-Deck Plus device running 2.6.4.b89355f with MUI from the web-flasher during local testing on a Windows 11 host with esptool v4.8.1.

Running the command once sets the T-Deck to a different COM mode (new device in device manager) but still not in update mode.
Running the command again reboots into proper update mode. (black screen)

>device-install.bat -p COM17 --1200bps-reset
INFO  | 22:36:03 5 Using esptool port: COM17.
INFO  | 22:36:03 6 Using esptool baud: 1200.
esptool.py v4.8.1
Serial port COM17

A fatal error occurred: Failed to set baud rate 1200. The driver may not support this rate.

>device-install.bat -p COM18 --1200bps-reset
INFO  | 22:36:24 5 Using esptool port: COM18.
INFO  | 22:36:24 6 Using esptool baud: 1200.
esptool.py v4.8.1
Serial port COM18
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: 3c:84:27:ed:a3:e8
Uploading stub...
Running stub...
Stub running...
Status value: 0x0200
Staying in bootloader.

fix #6529

@jedahan
Copy link

jedahan commented May 7, 2025

Small suggestion - change-mode feels 'generic' to me, how about --reset or --request-reset or --1200bps-reset or --reset-1200bps?

@thebentern
Copy link
Contributor

@ThatKalle can we change the param name to 1200bps-reset? I think we can merge this after that

@ThatKalle ThatKalle changed the title Add --change-mode to device-install/update scripts Add --1200bps-reset param to device-install/update scripts Jun 2, 2025
@thebentern thebentern merged commit 4d81280 into meshtastic:master Jun 3, 2025
52 checks passed
f1smf added a commit to f1smf/firmware that referenced this pull request Jun 4, 2025
* Hostmetrics user string (meshtastic#6850)

* [create-pull-request] automated change (meshtastic#6857)

Co-authored-by: thebentern <[email protected]>

* Increase the debt ceiling

* Add basic handling for is_manually_validated (meshtastic#6856)

* If a contact is add from a QR, it's "verified" manually (meshtastic#6858)

* If a contact is add from a QR, it's "verified" manually

* Update src/mesh/NodeDB.cpp

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* Update meshtastic/device-ui digest to 405ca49 (meshtastic#6865)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* InkHUD Extended ASCII (meshtastic#6768)

* Custom AdafruitGFX fonts with extended ASCII encodings

* AppletFont handles re-encoding of UTF-8 text

* Manual parsing of text which may contain non-ASCII chars

* Display emoji reactions, even when unprintable
Important to indicate to users that a message has been received, even if meaning is unclear.

* Superstitious shrink_to_fit
I don't think these help, but they're not hurting!

* Use Windows-1252 fonts by default

* Spelling

* Tidy up nicheGraphics.h

* Documentation

* Fix inverted logic
Slipped in during a last minute renaming while tidying up to push..

* Added map report precision bounds (meshtastic#6862)

* Added map report precision bounds

* Log warning

* Precision range should be 12-15

* Missed commit

* Update tests

* That method was renamed

* Removed now-defunct test call

* Remove defunct test

* update seeed solar node led pin (meshtastic#6871)

* Update Adafruit PM25 AQI Sensor to v2 (meshtastic#6778)

* Bosch bsec2: Switch back to official releases (meshtastic#6870)

* Update meshtastic/device-ui digest to 0e9bb79 (meshtastic#6880)

 fix bluetooth fixedPin during restart (meshtastic#135)

* Update meshtastic/device-ui digest to 2fba9de (meshtastic#6882)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* graphics: Add GDEY0213B74 E-Ink display driver (meshtastic#6879)

Implement the GDEY0213B74 driver with configuration methods for scanning, waveform, update sequence, and polling for refresh completion. This driver supports both fast and full update types for the 2.13 inch E-Ink display.

Signed-off-by: ChihoSin [email protected]

Signed-off-by: ChihoSin [email protected]

* feat(RadioInterface): Tx power gain calculation rework (meshtastic#6796)

- Rename REGULATORY_GAIN_LORA to TX_GAIN_LORA
- Move gain-based Tx power clamping from RadioInterface::applyModemConfig() to RadioInterface::limitPower()
  - User-configured Tx power now matches the Tx power out of the device connector
- Re-order [LoRa Chip]Interface.cpp limitPower() to take place before the final Tx power clamping so we clamp based on the pre-PA Tx power rather than user-configured Tx power

Tested on XIAO BLE variant.

Signed-off-by: Andrew Yong <[email protected]>
Co-authored-by: Ben Meadors <[email protected]>

* Upgrade trunk (meshtastic#6843)

Co-authored-by: sachaw <[email protected]>

* [create-pull-request] automated change (meshtastic#6885)

Co-authored-by: thebentern <[email protected]>

* chore(deps): update meshtastic/device-ui digest to e63b219 (meshtastic#6883)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix is_unmessagable plumbing (meshtastic#6886)

* Add PCT2075 Temperature Sensor (meshtastic#6829)

This is an I2C temperature sensor. It is intended to be a drop-in
compatible sensor for the LM75, however it is more accurate.

Co-authored-by: Ben Meadors <[email protected]>

* Add heap metrics to Local stats (meshtastic#6887)

* Add missing parsing of UTF-8 chars (meshtastic#6889)

* automated bumps (meshtastic#6890)

Co-authored-by: thebentern <[email protected]>

* Linux: Adjust udev rules for gpio (meshtastic#6891)

* Upgrade trunk (meshtastic#6898)

Co-authored-by: sachaw <[email protected]>

* [create-pull-request] automated change (meshtastic#6905)

Co-authored-by: jp-bennett <[email protected]>

* Don't cancel sending ReTx for relayer if we're ROUTER(_LATE)/REPEATER (meshtastic#6904)

Co-authored-by: Ben Meadors <[email protected]>

* Add LINK32 (Lilygo) Board with Light+Environment sensors (meshtastic#6899)

* Add LINK32 (Lilygo) Board with Light+Environment sensors
TODO: replace PRIVATE_HW with actual HWID

* Add LINK32 (Lilygo) Board with Light+Environment sensors
TODO: replace PRIVATE_HW with actual HWID

* Update to real HWID and trunk fmt

* [create-pull-request] automated change (meshtastic#6909)

Co-authored-by: thebentern <[email protected]>

* Coerce user.id to always be derive from the nodenum (meshtastic#6906)

* Coerce user.id to always be derive from the nodenum

* Additionally null it out on send

* Revert "Additionally null it out on send"

This reverts commit 22a2d68.

* Parse own short name in LogoApplet (meshtastic#6913)

* chore(deps): update meshtastic/device-ui digest to 3dfcc97 (meshtastic#6912)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* add support for seeed wio tracker L1 (meshtastic#6907)

* add support for seeed  wio tracker l1

* add support in nrf52 arch

* fix ADC problem and comments incorrect

* fix gps wakeup pin

* fix gps pin

* Trunk

* Upgrade trunk to 1.24.0 (meshtastic#6915)

Co-authored-by: sachaw <[email protected]>

* Added full support for LTR390UV readings of UV and Lux (meshtastic#6872)

* Added full support for LTR390UV readings of UV and Lux

* Trunk formatting

* Added full support for LTR390UV readings of UV and Lux

* Trunk formatting

* fix library check and unnecessary bit resolution change

* fixed log info messages and removed unused dependency

* Hopefully fixes git mess

* fix variable scope and getMetrics returns

* set metrics flags bavk to false in case something wrong happens while reading LTR390UV  mode

---------

Co-authored-by: Domingo <[email protected]>
Co-authored-by: Ben Meadors <[email protected]>

* Add a new screen for heltec_wireless_paper. (meshtastic#6894)

Co-authored-by: Ben Meadors <[email protected]>

* Revert "Add a new screen for heltec_wireless_paper. (meshtastic#6894)" (meshtastic#6918)

This reverts commit ba53543.

* Fix renovate for Adafruit PCT2075 (meshtastic#6919)

* Update TSL2591Sensor.cpp (meshtastic#6921)

Lower gain and timing to avoid saturation in bright light

* Upgrade trunk (meshtastic#6922)

Co-authored-by: sachaw <[email protected]>

* chore(deps): update meshtastic/device-ui digest to 37e2fb8 (meshtastic#6925)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Don't give LOG_INFO a null

* chore(deps): update meshtastic/device-ui digest to 04e3a07 (meshtastic#6942)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Upgrade trunk (meshtastic#6941)

Co-authored-by: sachaw <[email protected]>
Co-authored-by: Ben Meadors <[email protected]>

* chore(deps): update meshtastic/device-ui digest to 649e095 (meshtastic#6943)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add --1200bps-reset param to device-install/update scripts (meshtastic#6752)

* add change-mode support

* add change-mode support

* tab to space

* fix if check

* change param name to 1200bps-reset

* update help section

* missed one in help seciton

---------

Co-authored-by: Ben Meadors <[email protected]>

* automated bumps (meshtastic#6944)

Co-authored-by: thebentern <[email protected]>

---------

Signed-off-by: ChihoSin [email protected]
Signed-off-by: Andrew Yong <[email protected]>
Co-authored-by: Jonathan Bennett <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: thebentern <[email protected]>
Co-authored-by: Ben Meadors <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: todd-herbert <[email protected]>
Co-authored-by: dylanli <[email protected]>
Co-authored-by: Austin <[email protected]>
Co-authored-by: Chiho Sin <[email protected]>
Co-authored-by: Andrew Yong <[email protected]>
Co-authored-by: sachaw <[email protected]>
Co-authored-by: Michael Cullen <[email protected]>
Co-authored-by: jp-bennett <[email protected]>
Co-authored-by: GUVWAF <[email protected]>
Co-authored-by: Thomas Göttgens <[email protected]>
Co-authored-by: dmarman <[email protected]>
Co-authored-by: Domingo <[email protected]>
Co-authored-by: Quency-D <[email protected]>
Co-authored-by: ArgoNavi <[email protected]>
Co-authored-by: Kalle Lilja <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: fixes for device-install.sh and device-update.sh
4 participants